package web.java.login;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class loginout extends HttpServlet {

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html");
		
		//删除session
		HttpSession session=request.getSession(false);
		if(session!=null){
			//移除属性
			session.removeAttribute("name");
		}
		//返回登录界面
		response.sendRedirect(request.getContextPath()+"/login.html");
		
	}

}
